#include "Cloud.h"


Cloud::Cloud(Physics* vatly) : GameObject()
{
	vx = 0;
	vy = 0;
	vat_ly = vatly;
	vat_ly->setV(0.7f,0.5f);
	Body* a = new Body();
	a->init();
	a->setSprite(CLOUD);

	this->addComponent(a);
	this->addComponent(vat_ly);
	
}


Cloud::~Cloud(void)
{
}

void Cloud::update()
{
	GameObject::update();
	//Physics* vat_ly = (Physics*)getComponentById(PHYSICS);
	if (vat_ly->getPosition().x > 2000)
		vat_ly->_pos.x = -2000;
	
}
